<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />

<style type="text/css">
  html { height: 100% }
  body { height: 100%; margin: 0px; padding: 0px }
  #map_canvas { height: 100% }
</style>
<script type="text/javascript"
    src="http://maps.google.com/maps/api/js?sensor=true&region=zh_Hans&language=zh">
</script>

<script type="text/javascript">
var member = new Array();
	member[0] = new Array("Name0","30", "100", "addr0"); 
	member[1] = new Array("Name1","32", "102", "addr1"); 
	member[2] = new Array("Name2","34", "104", "addr2"); 
	member[3] = new Array("Name3","36", "106", "addr3"); 
	member[4] = new Array("Name4","38", "108", "addr4");
var marker = new Array();

//*****************initialize*****************//
function initialize() {
	var myLatlng = new google.maps.LatLng(37.245619,104.0625);
	var myOptions = {
	zoom: 4,
	center: myLatlng,
	panControl: true,
	zoomControl: true,
	mapTypeControl: true,
	scaleControl: true,
	streetViewControl: false,
	overviewMapControl: false,
	rotateControl: true,
	mapTypeId: google.maps.MapTypeId.ROADMAP
	}
	var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
	//****************markers*******************//
	for(var i=0; i< member.length;i++){
		var tempLatlng = new google.maps.LatLng(member[i][1],member[i][2]);
		marker[i] = new google.maps.Marker({
		position: tempLatlng, 
		map: map,
		title:member[i][0] + ": " + member[i][3],
		});
  
		google.maps.event.addListener(marker[i], 'click', function() {
		map.setCenter(tempLatlng);
		map.setZoom(10);
		});
	}
}

//!********** Listener ************!//
/*  google.maps.event.addListener(map, 'zoom_changed', function() {
  setTimeout(moveToDarwin, 3000);
  });
*/

//!************MyLocation*******************!//
/*  
  // Try W3C Geolocation (Preferred)
	var browserSupportFlag =  new Boolean();
  if(navigator.geolocation) {
    browserSupportFlag = true;
    navigator.geolocation.getCurrentPosition(function(position) {
      initialLocation = new google.maps.LatLng(position.coords.latitude,position.coords.longitude);
      map.setCenter(initialLocation);
    }, function() {
    });
  }
  else {
    browserSupportFlag = false;
  }
    handleNoGeolocation(browserSupportFlag);
	
  function handleNoGeolocation(SupportFlag) {
    if (SupportFlag == true) {
     // alert("Geolocation service failed.");
     // initialLocation = newyork;
    } else {
      alert("Your browser doesn't support geolocation. We've placed you in China.");
    }
    map.setCenter(initialLocation);
  }

*/
</script>
</head>
<body onload="initialize()">
	<div id="map_canvas" style="width:100%; height:100%"></div>
  
</body>
</html>